package interfaces;

import java.net.URL;
import java.util.ResourceBundle;
import javafx.animation.FadeTransition;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.*;
import javafx.scene.layout.AnchorPane;
import javafx.util.Duration;

/**
 * Profile Controller.
 */
public class AltaTitularDenegadaController extends AnchorPane implements Initializable {

    @FXML
    private Button aceptar;
   
    private Main application;
    
    public void setApp(Main application){
        this.application = application;
        
        }

    

    @Override
    public void initialize(URL location, ResourceBundle resources) {
    	
    	aceptar.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent event) {
           	 application.menuprincipal();
             application.cerrarModal();
             application.stage.getScene().getRoot().setEffect(null);
            }
        });
    	
    }
    
    public void processLogout(ActionEvent event) {
        if (application == null){
            // We are running in isolated FXML, possibly in Scene Builder.
            // NO-OP.
            return;
        }
        
        application.userLogout();
    }
    
   
    
}
